# #1,
# list=[1,2,3,4,5,6,7,8,9,4,4,4,4]
# try:
#     i=len(list)
#     if i>10:
#         raise Exception("长度大于10")
# except Exception as e:
#     print(e)
#     print("ppp")
#
# #2.
# try:
#     cot = open('lmin.py')
#
# except (ValueError, ZeroDivisionError, IOError, Exception) as e:
#     print(e)
#3 try-except和try-finally有什么不同,写例子理解区别





#4.
def fun(a):
    if isinstance(a,dict):
        c={}
        for i,j in a.items():
            if len(j)>2:
                c[i]=j[0:2]
            else:
                c[i]=j
<<<<<<< HEAD
        return  a
=======
>>>>>>> 927d69a68b1fd1f5527403d3e184ee20967091ff
            print(c)

dic={'k1':'v1v1','k2':[11,22,33]}
fun(dic)

